using UnityEngine;
// [Assembly-CSharp.dll].UMPManager
public class UMPManager : MonoBehaviour
{
    // Fields
    private GoogleMobileAds.Ump.Api.ConsentForm _consentForm;
    
    // Methods
    private void Start()
    {
        GoogleMobileAds.Ump.Api.ConsentRequestParameters val_1 = 536884181;
        val_1 = new GoogleMobileAds.Ump.Api.ConsentRequestParameters();
        System.Action<System.Object> val_2 = 536873355;
        val_2 = new System.Action<System.Object>(object:  this, method:  1610677195);
        GoogleMobileAds.Ump.Api.ConsentInformation.Update(request:  val_1, consentInfoUpdateCallback:  val_2);
    }
    private void OnConsentInfoUpdated(GoogleMobileAds.Ump.Api.FormError error)
    {
        if(error != null)
        {
                UnityEngine.Debug.LogError(message:  error);
            return;
        }
        
        if(GoogleMobileAds.Ump.Api.ConsentInformation.IsConsentFormAvailable() == false)
        {
                return;
        }
        
        this.LoadConsentForm();
    }
    private void LoadConsentForm()
    {
        System.Action<System.Object, System.Object> val_1 = 536873487;
        val_1 = new System.Action<System.Object, System.Object>(object:  this, method:  1610677199);
        GoogleMobileAds.Ump.Api.ConsentForm.Load(formLoadCallback:  val_1);
    }
    private void OnLoadConsentForm(GoogleMobileAds.Ump.Api.ConsentForm consentForm, GoogleMobileAds.Ump.Api.FormError error)
    {
        if(error != null)
        {
                UnityEngine.Debug.LogError(message:  error);
            return;
        }
        
        this._consentForm = consentForm;
        if(GoogleMobileAds.Ump.Api.ConsentInformation.ConsentStatus != 2)
        {
                return;
        }
        
        System.Action<System.Object> val_2 = 536873355;
        val_2 = new System.Action<System.Object>(object:  this, method:  1610677201);
        this._consentForm.Show(onDismissed:  val_2);
    }
    private void OnShowForm(GoogleMobileAds.Ump.Api.FormError error)
    {
        if(error != null)
        {
                UnityEngine.Debug.LogError(message:  error);
            return;
        }
        
        this.LoadConsentForm();
    }
    public UMPManager()
    {
    
    }

}
